package com.pmcc.platform.shopping.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.pmcc.core.entity.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

@Getter
@Setter
@Entity
@Table(name = "bp_goods_gift")
@org.hibernate.annotations.Table(appliesTo = "bp_goods_gift", comment = "生成二维码记录")
public class GoodsGift extends BaseEntity {


    @Column(columnDefinition = "varchar(255) COMMENT '二维码地址'")
    private  String code;//二维码地址

    @Column(columnDefinition = "varchar(100) COMMENT '用户Oppenid'")
    private  String userOpenId;//用户Oppenid    state为1是不能为空

    @Column(columnDefinition = "varchar(100) COMMENT '导购id'")
    private  String shoppingId; //导购id

    @Column(columnDefinition = "varchar(100) COMMENT '赠品id'")
    private  String goodsId;  //赠品id

    @Column(columnDefinition = "varchar(100) COMMENT '是否领取'")
    private  String state;//是否领取；   0：未领取   1：已领取

    @Column(columnDefinition = "varchar(100) COMMENT '店铺id'")
    private  String shopId;

    @Column(columnDefinition = "varchar(100) COMMENT '业务员id'")
    private  String salesmanId; //业务员id

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "getTime")
    private Date getTime;//领取时间


}
